<template>
  <!-- 项目实施-具体项目任务列表 3-2 -->
  <div>

    <div class="table-wrap" v-if="!taskAddShow">
      <div class="table-top">
        <a-button type="primary" class="buttonColorGreen addButton ml10 mr10" @click="taskAddShow=true">新增</a-button>
        <a-input-search placeholder="请输入内容" v-model="search" class="search" @search="onSearch" />
        <a-button type="primary" class="buttonColorGreen ml10 mr10">查询</a-button>
        <a-button type="primary" class="buttonColorGreen ml10 mr10" @click="reset">重置</a-button>
        <a-button type="primary" class="buttonColorGreen ml10 mr10" @click="back">返回</a-button>
      </div>

      <a-tabs defaultActiveKey="1" v-if="type=='ch'">
        <a-tab-pane tab="资料收集" key="1">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
        <a-tab-pane tab="技术方案确定" key="2">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
        <a-tab-pane tab="外业测量" key="3">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
        <a-tab-pane tab="内页处理" key="4">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
        <a-tab-pane tab="数据建库" key="5">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
        <a-tab-pane tab="数据质检" key="6">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
        <a-tab-pane tab="验收" key="7">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
      </a-tabs>
      <a-tabs defaultActiveKey="1" v-if="type=='rj'">
        <a-tab-pane tab="需求调研" key="1">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
        <a-tab-pane tab="系统设计" key="2">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
        <a-tab-pane tab="编码" key="3">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
        <a-tab-pane tab="测试" key="4">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
        <a-tab-pane tab="验收" key="5">
          <TaskTable :tableData="tableData"></TaskTable>
        </a-tab-pane>
      </a-tabs>
    </div>
    <TaskAdd v-if="taskAddShow" :taskAddShow.sync="taskAddShow" :type="type"></TaskAdd>
  </div>
</template>

<script>
import TaskTable from '@/components/taskTable'
import TaskAdd from './taskAdd'
const tableData = [//表格数据
  {
    number: '1',
    objectName: '外业测量',
    objectNum: 'RJ_001',
    checkinTime: 'AB村外业测量',
    time: "aaaa",
    content: "bbbbbb",
    objectType: '张三',
    price: '20%',
    allPrice: 3,
    ss: 20,
    result: "已经检查"
  },
  {
    number: '2',
    objectName: '外业测量',
    objectNum: 'RJ_001',
    checkinTime: 'AB村外业测量',
    time: "aaaa",
    content: "bbbbbb",
    objectType: '张三',
    price: '20%',
    allPrice: 3,
    ss: 20,
    result: "已经检查"
  },
  {
    number: '3',
    objectName: '外业测量',
    objectNum: 'RJ_001',
    checkinTime: 'AB村外业测量',
    time: "aaaa",
    content: "bbbbbb",
    objectType: '张三',
    price: '20%',
    allPrice: 3,
    ss: 20,
    result: "已经检查"
  }
];
export default {
  props: {
    taskShow: Boolean
  },
  components: {
    TaskTable,
    // Personnel
    TaskAdd
  },
  data() {
    return {
      tableData,
      search: '',
      type: 'ch',
      taskAddShow: false
    }
  },
  methods: {
    onSearch() {   //搜索

    },
    reset() {  //重置
      this.search = ""
    },
    back() {
      this.$emit('update:taskShow', false)
    }
  }
}
</script>

<style scoped>
>>> .ant-tabs {
  padding: 0 20px;
}
</style>

